package com.zsh.myserver.repository;

import com.zsh.myserver.model.Banner;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

/**
 * Copyright ©2017-2020 Machinsight Technology Co., Ltd.All rights reserved.
 * Author: Zhoushaohua
 * Date: 2020/4/15
 * Description:
 */
@Repository
public interface BannerRepository extends JpaRepository<Banner, Long> {

    /**
     * 根据id来查找
     *
     * @param id
     * @return
     */
    Banner findOneById(long id);

    /**
     * 根据名称来查找
     *
     * @param name
     * @return
     */
    Banner findOneByName(String name);
}
